package com.app.controller;

/*
  @author 阿伟
  @create 2020-12-03:17:14
*/

import com.app.service.UserService;
import com.common.entity.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Api(tags = "web端上传图片的接口")
@RestController
@RequestMapping("/web")
public class UploadController {

    @Autowired
    UserService userService;

    @ApiOperation("上传图片")
    @PostMapping("/upload")
    public ResponseResult upload(
            @RequestBody MultipartFile multipartFile){

        return userService.upload(multipartFile);
    }
}
